'use strict';

var services = angular.module('services', ['ngResource']);

services.factory('Question', ['$resource', function ($resource) {
    return $resource('rest/questions/:questionId', {questionId:'@id'}, {
        'update': {method: 'PUT'}
    });
}]);

services.factory('Author', ['$resource', function ($resource) {
	return $resource('rest/authors/:authorId', {authorId:'@id'}, {
		'update': {method: 'PUT'}
	});
}]);

services.factory('Tag', ['$resource', function ($resource) {
	return $resource('rest/tags/:tagId', {tagId:'@id'}, {
		'update': {method: 'PUT'}
	});
}]);

services.factory('Answer', ['$resource', function ($resource) {
	return $resource('rest/answers/:answerId', {answerId:'@id'}, {
		'update': {method: 'PUT'}
	});
}]);

services.factory('QList', ['$resource', function ($resource) {
	return $resource('rest/qlists/:qlistId', {qlistId:'@id'}, {
		'update': {method: 'PUT'}
	});
}]);